 <!DOCTYPE html>
<html class="um landscape min-width-240px min-width-320px min-width-480px min-width-768px min-width-1024px">
    <head>
        <title></title>
        <meta charset="utf-8">
        <meta name="viewport" content="target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <link rel="stylesheet" href="css/ui-input.css">
        <link rel="stylesheet" href="css/ui-img.css">
        <link rel="stylesheet" href="css/ui-base.css">
        <link rel="stylesheet" href="css/ui-box.css">
        <link rel="stylesheet" href="css/ui-color.css">
        <script src="js/zy_control.js"></script>
        <script src="js/zy_click.js"></script>
        <script src="js/zy_json.js"></script>
        <script src="js/base64.js"></script>
        <script src="js/xmlToJson.js"></script>
        <script src="js/main1.js"></script> 
        <style type="text/css">
            body{  
                font-family: "Helvetica Neue", Helvetica;
            }
            body:before {    
              content: ' ';
              position: fixed;
              z-index: -1;
              top: 0;
              right: 0;
              bottom: 0;
              left: 0;
            }
            .ub-hor {
                -webkit-box-orient:horizontal;
                box-orient:horizontal;
            }
            .gps{
                background-image: url(image/gps.png);
                width: 1.5em;
                height: 1.5em;
                margin-left: 0.3em;
            }
            .search{
                background-image: url(image/search.png);
                width: 1em;
                height: 1em;
                margin-right: 0.3em;
            }
            .tf{
                background-image: url(image/blueDown.png);
                width: 1em;
                height: 1em; 
            }
            input[type="radio"]:checked + div.inOutPort {
                background: #5868b2;
                color:#FFFFFF;
                background: -webkit-linear-gradient(#b9c0de, #5c67b6);
            }
            input[type="radio"]+div.inOutPort {
                background: #F0F0F0;
                color:#5868b2;
            }
            input[type="radio"]:checked + div.statistical {
                background: #4881cb;
                color:#FFFFFF;
                width: 44%;
                height: 60%;
                border-radius:0.3em;
                margin:0 1%;
            }
            input[type="radio"]+div.statistical {
                border:2px solid #4881cb;
                color:#FFFFFF;
                width: 44%;
                height: 60%;
                border-radius:0.3em;
                margin:0 1%;
            }
            .ulev-4 {
                font-size: 0.75em !important;
            }
            .inPort{
                border-top-left-radius: 0.3em;
                border-bottom-left-radius: 0.3em;
            }
            .outPort{
                border-top-right-radius: 0.3em;
                border-bottom-right-radius: 0.3em;
            }
            .inoutbor{
                border: solid 1px #5868b2;
                width: 50%; 
            }
            .downf{
                background-image: url(image/down.png);
                width: 1.2em;
                height: 1.2em;
            }
            .upf{ 
                background-image: url(image/up.png);
                width: 1.2em;
                height: 1.2em;
            }
            .qh1{
                background-image: url(image/qh1.png);
                width: 0.85em;
                height: 0.85em;
            }
            .qh2{
                background-image: url(image/qh2.png);
                width: 0.85em;
                height: 0.85em;
                margin-left: 0.1em;
            }
            .qf{
                background-image: url(image/qf.png);
                width: 1em;
                height: 1em;
                margin: 0 0.1em;
            }
            .jl{
                background-image: url(image/jl.png);
                width: 1.2em;
                height: 1.2em;
                margin: 0 0.1em;
            }
            .warnyd{
                background-image: url(image/blueWarning.png);
                width: 1em;
                height: 1em;
            }
            .warnydlb{
                background-image: url(image/warning.png);
                width: 1em;
                height: 1em;
            }
            .leftyd{
                background-image: url(image/xz_1.png);
                width: 1em;
                height: 1em;
            }
            .cha{
                background-image: url(image/Del.png);
                width: 1.5em;
                height: 1.5em;
            }
            .addressList{
                background-image: url(image/add_2.png);
                width: 1.2em;
                height: 1.2em;
            }
           .jiZu{
                background-image: url(image/jz_1.png);
                width: 1.2em;
                height: 1.2em;
            }
            .jia{
                background-image: url(image/add.png);
                width: 1.5em; 
                height: 1.5em;
            }
            .seats{
                background-image: url(image/zz.png);
                width: 1.2em;
                height: 1.2em;
            }
            .calendar{
                background-image: url(image/blue-calendar.png);
                width: 1.3em;
                height: 1.3em;
            }
            .wqf1{ 
                background: #14AA54;
                height: 0.3em;
                width: 100%;  
                -webkit-animation:wqfani 2s linear;       
            }
            .wqf2{ 
                background: #14AA54;
                height: 0.3em;
                width: 100%;  
                -webkit-animation:wqfani 2s linear;       
            }
            .wqf3{ 
                background: #FE9002;
                height: 0.3em;
                width: 100%;  
                -webkit-animation:wqfani 2s linear;       
            }
            @-webkit-keyframes wqfani{ 
                0%  { width:0;} 
                100%{ width:100%;}
            }
            .jzzq1{ 
                background: green;
                height: 0.3em;
                width: 100%;
                -webkit-animation:jzzqani 1s linear;       
            }
            @-webkit-keyframes jzzqani{ 
                0%  { width:0;} 
                100%{ width:100%;}
            }
            .jzzq2{ 
                background: red;
                height: 0.3em;
                width: 100%;
                -webkit-animation:jzzqani 1s linear;       
            }
            @-webkit-keyframes jzzqani{ 
                0%  { width:0;} 
                100%{ width:100%;}
            }
            .jzzq3{ 
                background: #ffa200;
                height: 0.3em;
                width: 100%; 
                -webkit-animation:jzzqani 1s linear;       
            }
            @-webkit-keyframes jzzqani{  
                0%  { width:0;} 
                100%{ width:100%;}
            }
            .trangle {
                width: 0;
                height: 0;
                border-width: .5em;
                border-style: solid;
                border-color: transparent #fff transparent transparent;
                position: absolute;
                top:-3.5em;
                right: 0;
            }
            .trangle2 {
                width: 0;
                height: 0;
                border-width: 8px;
                border-style: solid;
                border-color: transparent transparent transparent transparent;
                margin-top: -5%;
                 position: absolute;
                top:-4em;
                right: 0;
            }
 
        </style> 
    </head>
    <body class="" ontouchstart style="min-height: 100%;background: #eaeaea">
                <div id="" class="ub ub-ver" style="background-color: #eaeaea;position: fixed;top: 0;z-index: 10000;width: 100%;height: 8.6em;font-family: '微软雅黑'">
                     <div class="ub ub-ac" style="padding: 1em .1em .5em;background: #eaeaea">
                        <div class="ub" style="width: 99.5%;margin:0 auto;background: #fff;padding: .5em 0;">
                            <div class="ub" style="width: 56%;border:1px solid #1c97f4 ;margin-left: .7em;background: #fff;border-radius: 5px;">
                                <input type="radio" name="rdi1" class="uhide" checked="checked" value="">
                                <div class="tx-c" id="chugang" style="width: 50%;padding: .5em 0;font-size: .8125em;background: #1C94EA;color: #fff;" onclick="zy_for(event,function(){queryOutInFlight('out','outAirPort')});">
                                                                                                          出港<span style="padding-left: .2em" id="outAirPort"  data-out="true">--/--</span>
                                </div>
                                    <input type="radio" name="rdi1" class="uhide" value="">  
                                <div class="tx-c" id="jingang" style="width: 50%;padding: .5em 0;font-size: .8125em;background: #fff;border-top-right-radius: 5px;border-bottom-right-radius: 0.5em;" onclick="zy_for(event,function(){queryOutInFlight('in','inAirPort')});">
                                                                                                        进港<span id="inAirPort"  data-in="false" style="padding-left: .2em">--/--</span>
                                </div>
                            </div>
                            <div id="" style="width: 38%;margin-left: 3% ">
                                <div class="ub ub-hor ub-ac ub-pc ub-f1" style="border: 1px solid #E4E4E4;border-radius: 0.2em;background: #eaeaea;width: 87%;margin-right:2%;margin:2% 2% 2% 0;">
                                    <div class="ub ub-ac ub-pc uinput ub-f1 ulev0" style="color:#b6b6b6;height: 1.8em;"><input type="search" id="airportFlight" placeholder="航班号" clientidmode="Static" style="padding: 0em;font-size:0.8em;padding-left: .3em" onkeydown='if(event.keyCode==13){searchlbb();}'></div>
                                    <div class="search ub-img" onclick="searchlbb()"></div> 
                                </div>
                            </div>
                         </div>
                      </div>
                       <div class="ub" style="background: #eaeaea;padding:0 .1em;">
                           <div class="ub" style="background: #fff;padding: .5em 0;width: 99.5%;margin: 0 auto;">
                               <div class="ub" style="width: 53%;font-size: .8125em;padding-left: .7em" onclick="selectAirPort()">
                                   <div id="" >
                                       当前航站
                                   </div>
                                   <div id="" style="background: url(image/11.png)no-repeat 0 0;background-size: 1.3em;background-position: center 40%;width:1.5em;padding: .5em 0">
                                       
                                   </div>
                                   <div data-airpot="" id="airportText">
                                       纽约肯尼迪
                                   </div>
                                   <div id="" style="background: url(image/Rectangle-15-copy.png)no-repeat 0 0;background-size: 1em;background-position: center ;width:1.2em;padding: .5em 0;margin-left: .3em">
                                       
                                   </div>
                               </div>
                               <div class="ub" style="width: 45%;font-size: .8125em;" onclick="datePicker()">
                                   <div id="" >
                                       航班日期
                                   </div>
                                   <div id="" style="background: url(image/iconfont-riqi.png)no-repeat 0 0;background-size: 1.3em;background-position: center 40%;width:1.5em;padding: .5em 0">
                                   </div>
                                   <div id="selectDate">
                                       2016-08-30
                                   </div>
                                   <div id="" style="background: url(image/Rectangle-15-copy.png)no-repeat 0 0;background-size: 1em;background-position: center ;width:1.2em;padding: .5em 0;margin-left: .3em">
                                   </div>
                               </div>
                           </div>
                       </div>
                       <div class="ub" style="background: #eaeaea;padding:0 .1em;margin-top: .2em ;margin-bottom: 1em">
                           <div class="ub" style="background: #fff;padding: .5em 0;width: 99.5%;margin: 0 auto;" onclick="timezones()">
                               <div class="ub" style="width: 89%;font-size: .8125em;padding-left: .7em" >
                                   <div id="" >
                                       选择时区
                                   </div>
                                   <div id="" style="background: url(image/meeting.png)no-repeat 0 0;background-size: 1.3em;background-position: center 40%;width:1.5em;padding: .5em 0">
                                       
                                   </div>
                                   <div id="timezone">
                                       GMT-5(印第安纳，波哥大)
                                   </div>
                               </div>
                               <div class="ub" style="width: 7%;font-size: .8125em;">
                                   <div id="" style="background: url(image/Rectangle-15-copy.png)no-repeat 0 0;background-size: 1em;background-position: center ;width:1.2em;padding: .5em 0;margin-left: .3em">
                                       
                                   </div>
                               </div>
                           </div>
                       </div>
                    </div> 
            </div> 
                <div id="flighDataInfo" class="ub ub-ver" style="color: #36395C;height: 83%;margin:9.6em 0% 0;"></div>
    </body>
    <script> 
        zy_init();
        window.uexOnload = function(type){ 
             /*uexWindow.subscribeChannelNotification('today_yddf', 'onNotification');
                uexWindow.onNotification = function(cb){
                    eval(cb);
                };*/
            if (!type) {
                 uexWindow.subscribeChannelNotification('yddf_sel', 'onNotification');
                uexWindow.onNotification = function(cb){
                    eval(cb);
                };
                if(localStorage.getItem('err_arr2')){
                     var arr2=JSON.parse(localStorage.getItem('err_arr2'));
                     for(i=0;i<arr2.length;i++){
                         localStorage.setItem('xinhao',0);
                         localStorage.setItem('xiabiao',i);
                         var id=arr2[i].id;
                         var TASKTYPE=arr2[i].TASKTYPE;
                         var changedTime=arr2[i].changedTime;
                         var btntype=arr2[i].btntype;
                         var area=arr2[i].area;
                         var name=arr2[i].name;
                          appcan.window.evaluatePopoverScript({
                            name:'ensureNode',
                            popName:name,
                            scriptContent:"UpdateTaskTime('"+id+"','"+TASKTYPE+"','"+changedTime+"','"+btntype+"','"+area+"')"
                       });
                     };
                 }
                var date= new Date();
                var year = check(date.getFullYear());
                var month = check(date.getMonth() + 1);
                var days = check(date.getDate()); 
                var Year=JSON.stringify(year);
                setLocVal("Year",Year)
                $$("selectDate").innerHTML=Year.substr(2,2)+"/"+month+"/"+days;
                initDatePicker("selectDate");
                settimezone();//设置时区
                MARK=0;
                window.localStorage.setItem("fttype","out"); 
                setLocVal("MARK",MARK);
               //初始化所有航站信息
               queryAllAirport();
               //setLocVal("yddfChooseAirportName","浦东外航");
              // setLocVal("yddfChooseAirportCode","PVG");
               var name = getLocVal("airportName");
               var code = getLocVal("airportCode");
               if(isDefine(name) && isDefine(name)){
                    $$("airportText").setAttribute("data-airport",code);
                    $$("airportText").innerHTML = name;
                    //默认初始化当前机场航班出港信息
                    queryAirPortInfo("out",code); 
                    //初始化进出港信息
                    queryCurrentAirport(code); 
               }else{
                   //定位当前机场位置，定位成功后默认加载当前机场出港信息以及机场航班信息
                   setLocalLocation(setDefauleIATACodeCallback);
               }
               //设置页面弹动效果
               pullDown(); 
            }
            pullDown(function() {
                queryCurrentAirport();//进出港刷新
                airportSearch(); //重新加载数据
            });
            window.onorientationchange=window.onresize=function(){  
            }
        } 
        /**
         *打开航站列表
         */
        function selectAirPort(){
            openNewWin("airport_select1","airport_select1.html");
        }
        //时区
        function settimezone(){
            if(window.localStorage.getItem("myTimezone_df")==undefined){
                window.localStorage.setItem("myTimezone_df","+8")
            }
            if(window.localStorage.getItem("Timezone_area_df")==undefined){
                window.localStorage.setItem("Timezone_area_df","中国北京")
            }
            if(iG.getObjItem("LoginInforAMC","myTimezone")==undefined){
                iG.setObjItem("LoginInforAMC","myTimezone","+8")
            }
            if(iG.getObjItem("LoginInforAMC","Timezone_area")==undefined){
                iG.setObjItem("LoginInforAMC","Timezone_area","中国北京");
            }
             var timez=window.localStorage.getItem("myTimezone_df");
             var timea=window.localStorage.getItem("Timezone_area_df");
             $$("timezone").innerHTML="GMT"+timez+"("+timea+")";
        }
        //选择时区后刷新数据
        function settimezone2(){
            var airport= $$("airportText").getAttribute("data-airport");
            //2.获取当前页面在进港还是出港
            var type = "";
            var dataOut = $$("outAirPort").getAttribute("data-out");
            var dataIn = $$("inAirPort").getAttribute("data-in");
            if(dataOut == "true"){ 
                type = "out";
            }else if(dataIn == "true"){
                type = "in";
            }
            $$("flighDataInfo").innerHTML="";
            //3.调用查询航班信息的方法
            queryAirPortInfo(type,airport);
            //4.调用查询进出港信息的方法
            queryCurrentAirport(airport);
            
        }
        function timezones(){
             openNewWin("timeZone_win","timeZone_win.html");
        }
        /**
         *展开部分餐食信息、遣返旅客、赶售上报等其他div的替换效果
         */
        function changeText(i){
            //避免点击误触事件 
            setTimeout(function bb(){
               var form1=$$("form1"+i).className;
               var form2=$$("form2"+i).className;             
               if (form1.indexOf("uhide") > -1) {                
                $$("form1"+i).className = "ub-ver"; 
                $$("form2"+i).className = "uhide ub-ver"; 
               } else {                
                $$("form1"+i).className = "uhide ub-ver";
                $$("form2"+i).className = "ub-ver";
                } 
            },500);
        }
        /**
         *显示和隐藏详情信息 
         */
        function openDetailInfo(fid){
            var fic = $$(fid+"Img").className; 
            if(fic.indexOf("downf") > -1){
                $$(fid+"Img").className = "upf ub-img"; //点击的向下或向上图片
                $$(fid+"Br").style.borderRight = "2px solid #de7764"; //列表右边框
                $$(fid+"Detail").className = "ub ub-hor"; //详情数据
                $$(fid+"Detail").style.display = "";
            }else{
                $$(fid+"Img").className = "downf ub-img"; //点击的向下或向上图片
                $$(fid+"Br").style.borderRight = "2px solid #53a55d"; //列表右边框
                $$(fid+"Detail").className = "uhide"; //详情数据
            }
        }
        var airportObj = {}//存储航站飞机信息数据
        /**
         *查询所有的机场的三字码和中文名字
         */
        function queryAllAirport(){
            var dataUrl = yddfProUrl + "system_searchAirports.action?key=";
            $.getJSON(dataUrl, function(data){
                if(data.length > 0){
                    var tempHtml = "";
                    for(var i = 0;i < data.length;i++){
                        var enname = data[i].enname,
                            chname = data[i].chname;
                        airportObj[chname] = enname;
                    }
                }
            }, "json",function(err){
            }); 
        }
        /**
         *根据当前航站的三字码查询进出港信息 
         */
        function queryCurrentAirport(word){
            date='20'+$$("selectDate").innerHTML;
            dateTime=date.replace(/\//g,"-");
            var timeZ=window.localStorage.getItem("myTimezone_df");
            if(timeZ>0){
                timeZ=Math.abs(timeZ)
            }
            var word = $$("airportText").getAttribute("data-airport");
            var names=$$("airportText").innerHTML;
             if(names=='上海虹桥-外航'||names=='上海浦东-外航'){
                 word=word.split('-')[0];
                  var dataUrl="http://mpservice.ceair.com/ecosphere/fasco_getGateInfo.action?airport="+word;
             }else{
                 var dataUrl = yddfProUrl + "system_getGateInfo.action?airport="+word+"&date="+dateTime+"&timezone="+timeZ;
             }
            console.log(dataUrl); 
            $.getJSON(dataUrl, function(data){
                var intotal = data.intotal;
                var outtotal = data.outtotal;
                var ins = data["in"];
                var out = data.out;
                $$("inAirPort").innerHTML = ins +"/"+intotal;
                $$("outAirPort").innerHTML = out +"/"+outtotal;
            }, "json",function(err){
            });
        }
        /**
         * 航站地点切换后重新加载数据 
         */
        function chooseAiport(id){
            //1.获取航站的三字码
            var airport = $$(id).value;
            $$("airportText").setAttribute("data-airport",airport);
            //2.获取当前页面在进港还是出港
            var type = "";
            var dataOut = $$("outAirPort").getAttribute("data-out");
            var dataIn = $$("inAirPort").getAttribute("data-in");
            if(dataOut == "true"){
                type = "out";
                window.localStorage.setItem("fttype","out");
            }else if(dataIn == "true"){
                type = "in";
                window.localStorage.setItem("fttype","in");
            }
            //3.调用查询航班信息的方法
            queryAirPortInfo(type,airport);
            //4.调用查询进出港信息的方法
            queryCurrentAirport(airport);
        }
        /**
         * 通过点击进港和出港查询机场信息 
         */
        function queryOutInFlight(type,airportId){ 
            $$("flighDataInfo").innerHTML = "";
            Flag=0;
            pageNum=[];
            //设置当前点击是进港还是出港
            if(airportId == "outAirPort"){
                document.getElementById("chugang").style.background="#1C94EA";
                document.getElementById("chugang").style.color="#fff";
                document.getElementById("jingang").style.background="#fff";
                document.getElementById("jingang").style.color="#000";
                $$("outAirPort").setAttribute("data-out","true");
                $$("inAirPort").setAttribute("data-in","false");
            }else if(airportId == "inAirPort"){
                document.getElementById("chugang").style.background="#fff";
                document.getElementById("chugang").style.color="#000";
                document.getElementById("jingang").style.background="#1C94EA";
                document.getElementById("jingang").style.color="#fff";
                $$("outAirPort").setAttribute("data-out","false");
                $$("inAirPort").setAttribute("data-in","true");
            }
              
            //获取当前机场的三字码
            var airport = $$("airportText").getAttribute("data-airport");  
            // 查询机场航班信息      
            queryAirPortInfo(type,airport);
            //切换进港和出港时清空航班号输入的值
            $$("airportFlight").value="";   //切换进出港状态时清除输入的航班号
        }
        /**
         * 根据航班号查询航站的飞机信息 
         * type  进港:in  出港:out
         * airport 航站地点  三字码 
         * flightno  航班号  查询时候用 
         */
        function searchlbb(){
            $$("flighDataInfo").innerHTML = "";
            airportSearch();
        } 
        function airportSearch(){
            var type = "";
            //1.获取当前航站的三字码
            var airport = $$("airportText").getAttribute("data-airport");
            //2.获取页面是进港还是出港
            var dataOut = $$("outAirPort").getAttribute("data-out");
            var dataIn = $$("inAirPort").getAttribute("data-in");
            if(dataOut == "true"){
                type = "out";
            }else if(dataIn == "true"){
                type = "in";
            } 
            //3.获取输入的航班号
            var flightno = $$("airportFlight").value;
            //4.调用查询航班信息的方法    
            queryAirPortInfo(type,airport,flightno);
        }
        /**
         * 查询当前航站航班信息
         */
        var airportInfoObj = {},//存储航站飞机信息数据
            dwyyObj = [],       //存储对外原因信息数据
            hbrwObj = {},       //存储航班任务信息数据
            csObj={},           //存储航班餐食信息数据
            gzObj={},           //存储航班故障信息数据
            timeIdObj = {},  //存储时间和id对应信息
            timeIdArr = []; //存储时间数组
        var pageNo=""; //页数  默认第一页
        var Flag=0;
        var maxPageNo="";
        var pageNum=[];
        var fullRefreshFlag =  ''; //刷新标识
        var refreshType=0;
        function queryAirPortInfo(type,airport,flightno){ 
            var year=getLocVal("Year"); 
            date=year.substr(0,2)+$$("selectDate").innerHTML;
            dateTime=date.replace(/\//g,"-"); 
            var timezone=window.localStorage.getItem("myTimezone_df");
            if(timezone>0){ 
                timezone=Math.abs(timezone);
            }
            var dataUrl = "";
            var names=$$("airportText").innerHTML; 
            var airport = $$("airportText").getAttribute("data-airport");
            //names="上海虹桥-外航";
           // airport="SHA";  
            localStorage.setItem("portname",names); 
            localStorage.setItem("airport3zm",airport); 
            if(names=='上海虹桥-外航'||names=='上海浦东-外航'){ 
                airport=airport.split("-")[0];
                localStorage.setItem("airport3zm",airport); 
                //yddfProUrl="http://mpservice.ceair.com//ecosphere/";//生态圈
                if(isDefine(flightno)==true){    
                dataUrl = "http://mpservice.ceair.com//ecosphere/fasco_getInfoList.action?type="+type+"&airport="+airport+"&flightNo="+flightno;
            }else if(isDefine(flightno)==false&&Flag==0){
                dataUrl =  "http://mpservice.ceair.com//ecosphere/fasco_getInfoList.action?type="+type+"&airport="+airport+"&date="+dateTime+"&isDefault=1"+"&pageSize=10"+"&timezone="+timezone;
            }else if(isDefine(flightno)==false&&Flag==1){
                dataUrl = "http://mpservice.ceair.com//ecosphere/fasco_getInfoList.action?type="+type+"&airport="+airport+"&date="+dateTime+"&pageNo="+pageNo+"&pageSize=10"+"&timezone="+timezone;
            }   
            console.log(dataUrl);  
            uexWindow.toast(1, 5, '正在加载数据...', -1);
            $.getJSON(dataUrl, function(data){  
                console.log(JSON.stringify(data.array[0])+"TTTTT");
                 pageNo=data.pageNo;
                 maxPageNo=data.pageCount;
                 pageNum.push(pageNo);
                 var datajson=data;
                 //var Num=pageNum.sort();
                 var data=data.array;
                 if(data.length > 0){
                    var tempHtml = "";
                     for(var i = 0;i < data.length;i++){
                         if(datajson.airport=="SFO"||datajson.airport=="SEA"||datajson.airport=="ORD"||datajson.airport=="YVR"||datajson.airport=="LAX"||datajson.airport=="YYZ"){
                                var biaozhi=0;
                         }else{
                                var biaozhi=1;
                         }
                         timeIdObj[data[i].std] = "flight"+i+"List";
                         timeIdArr.push(data[i].std);
                         airportInfoObj[data[i].key]= data[i];                         
                         var d = data[i],
                         key = isDefine(d.key) ? d.key : "",
                         jhqfsj = isDefine(d.std) ? d.std : "",                                 //"jhqfsj": "09:05",   //计划起飞时间
                         jhqfrq = isDefine(d.sta1.split(" ")[0]) ? d.sta1.split(" ")[0] : "", 
                         hbh = isDefine(d.carrier) ? d.carrier+d.flightNo: "",                                        //"hbh": "MU2104",   //航班号
                         jh = isDefine(d.tailno) ? d.tailno : "",                                                 //"jh": "B1837", //机号
                         jx = isDefine(d.jx) ? d.jx : "",                                                 //"jx": "B6097"  //机型
                         fls = isDefine(d.fls) ? d.fls : "",                                          //头等舱
                         bls = isDefine(d.bls) ? d.bls : "",                                          //商务舱                                  
                         els = isDefine(d.els) ? d.els : "",                                          //经济舱
                         zt = isDefine(d.flightStatus) ? d.flightStatus : "",                                                //"zt": "到达",   //航班状态
                         cyr = isDefine(d.carrier) ? d.carrier : "",                                            //承运人
                         hb = isDefine(d.flightNo) ? d.flightNo : "", 
                         ewfy=d.ewfy,                                            //航班名
                         thyy = isDefine(d.thyy) ? d.thyy : "无",                                  //不正常航班上报处置方案退回原因
                         qxzt = isDefine(d.qxzt) ? d.qxzt : "",                                   //"qxzt": "已到达",   //前序航班状态
                         hxzt = isDefine(d.hxzt) ? d.hxzt : "",
                         qxid = isDefine(d.qxid) ? d.qxid : "",                                   //前序航班号id
                         hxid = isDefine(d.hxid) ? d.hxid : "",
                         //id = isDefine(d.id) ? d.id : "",  
                         id=i;
                         //本航班号id
                         jhqfjc = isDefine(d.deptAirportName) ? d.deptAirportName : "",                             //"jhqfjc": "北京首都",  //计划起飞机场
                         jhddjc = isDefine(d.arrAirportName) ? d.arrAirportName : "",                          //"jhddjc": "西安咸阳",  //计划到达机场
                         yjqfsj = isDefine(d.etd) ? d.etd : "",                              //"yjqfsj": "09:05", //预计起飞时间
                         sjqfsj = isDefine(d.atd) ? d.atd : "",                              //"sjqfsj": "",  //实际起飞时间
                         dwyyid = isDefine(d.dwyyid) ? d.dwyyid : "",         
                         dwyylegid = isDefine(d.dwyylegid) ? d.dwyylegid : "",
                         dwyy =  d.dwyy,
                         res = d.res,
                         dwyyjg = isDefine(d.dwyyjg) ? d.dwyyjg : "",                     //对外原因结果
                         qxid = isDefine(d.qxid) ? d.qxid : "",                                 //"qxid": "77073171",  //前序id
                         qxhbh = isDefine(d.qxhbh) ? d.qxhbh : "",                       //"qxhbh": "MU2104", //前序航班号
                         qxqfjc = isDefine(d.qxqfjc) ? d.qxqfjc : "",                        //"qxqfjc": "北京首都", //前序起飞机场
                         qxddjc = isDefine(d.qxddjc) ? d.qxddjc : "",
                         hxhbh = isDefine(d.hxhbh) ? d.hxhbh : "",                       //"qxhbh": "MU2104", //前序航班号
                         hxqfjc = isDefine(d.hxqfjc) ? d.hxqfjc : "",                        //"qxqfjc": "北京首都", //前序起飞机场
                         hxddjc = isDefine(d.hxddjc) ? d.hxddjc : "",                     //"qxddjc": "西安咸阳" //前序到达机场
                         jhddsj = isDefine(d.sta) ? d.sta : "",                         //计划到达时间    
                         yjddsj = isDefine(d.eta) ? d.eta : "",                        
                         sjddsj = isDefine(d.ata) ? d.ata : "",                          //实际到达时间
                         jz = d.jz,                                                           //机组
                         hbrw = isDefine(d.hbrw) ? d.hbrw : "",                            //航班任务
                         hbrwlist=hbrw,
                         hbrw=[]; 
                         for(var key2 in hbrwlist){
                             hbrw.push(hbrwlist[key2])
                         } 
                         //console.log(hbrw); 
                         hbrwObj["flight"+id+"hbrw"] = hbrw;
                         cs=isDefine(d.cs) ? d.cs : "";                                           //餐食信息
                         csObj["flight"+id+"cs"] = cs;
                         gz = isDefine(d.gz) ? d.gz : "";                                       //航班任务
                         gzObj[i] = gz;
                         setLocVal("thyy",thyy);
                                 tempHtml += '<div id="flight'+id+'List" data-timeflag="'+jhqfsj+'" class="ub ub-ver" style="color: #36395C;width: 100%;height:30%;margin-top: 1%;">';
                                        tempHtml += '<div class="ub ub-ac ub-hor" style="width: 100%;height: 100%;">';
                                            tempHtml += '<div class="ub ub-ver ub-ac" style="width: 9%;height: 100%; ">';
                                                if(type=="out"){
                                                    tempHtml += '<div id="jhqfsj'+id+'" class="ub ub-ac ub-pc" style="background: #fff;width: 2.5em;height: 2.5em;border-radius: 100%;margin-top: 10%;font-weight: bold;font-size: 0.65em;padding: 0.2em;"><a href="#top" mce_href="#top" style="text-decoration: none;color:#0f4b65;">'+jhqfsj+'</a> </div>';
                                                }else if(type=="in"){
                                                    tempHtml += '<div id="jhqfsj'+id+'" class="ub ub-ac ub-pc" style="background: #fff;width: 2.5em;height: 2.5em;border-radius: 100%;margin-top: 10%;font-weight: bold;font-size: 0.65em;padding: 0.2em;"><a href="#top" mce_href="#top" style="text-decoration: none;color:#0f4b65;">'+jhqfsj+'</a> </div>';
                                                }
                                                 tempHtml += '<div style="background: #fff;width: 5%;height: 80%;"></div>';
                                            tempHtml += '</div>';
                                            tempHtml+='<div  style="width:3%;position:relative"><div class="trangle"></div></div>';
                                             tempHtml += '<div id="flight'+id+'Br" class="ub ub-ver ub-ac" style="background: #fff;width: 85%;height: 100%;border-right: 2px solid #53a55d;">';
                                             
                                             tempHtml += '<div class="ub ub-hor ub-ac ub-ver" style="width:99%;height:30%">';
                                           tempHtml += '<div class="leftyd ub-img" style="margin-left:2%;"></div>'; 
                                           tempHtml +='<div id="qxid'+id+'" class="ub ub-hor ub-ac"  ontouchstart="zy_touch(\'ani-act\')"  onclick="openFlightInfor(\'qxid'+id+'\')"  data-key="'+jhqfrq+'" data-qxid="'+qxid+'">';
                                               tempHtml += '<div class="ub ub-hor ub-ac " >';
                                                   if(type=="out"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">前序</div>';
                                                   }else if(type=="in"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">后序</div>';
                                                   }
                                                   if(type=="out"&&qxhbh==""){
                                                       tempHtml += '<div id="qxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="out"&&qxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+qxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml+='</div>';//82%配对
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(qxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                               }else if(qxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(qxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }else if(type=="in"&&hxhbh==""){
                                                       tempHtml += '<div id="hxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="in"&&hxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+hxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '<div class="ub ub-ac" style="width: 60%;margin-left:15%;">';
                                                   tempHtml += '<div id="hxqfjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:right;">'+hxqfjc+'</div>';
                                                   tempHtml +='</div>';
                                                           tempHtml += '<div>-</div>';                                                   
                                                   tempHtml += '<div id="hxddjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:left;">'+hxddjc+'</div>';
                                                   tempHtml +='</div>';
                                               tempHtml += '</div>';//70%配对
                                               tempHtml+='</div>';//82%配对
                                                
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(hxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                               }else if(hxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(hxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }  
                                                tempHtml += '<div class="ub ub-ac ub-pj" style="height: 30%;width: 100%;">';
                                                     tempHtml += '<div class="ub ub-ac ub-hor ub-f1" style="width: 70%;">';
                                                        if(type=="out"&&qxid!=""){ 
                                                            tempHtml += '<div id="qxhbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#ccc;;border-radius:0.3em;">'+qxhbh+'</div>';
                                                            tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;padding:0.2em;width:3.8em;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        }else if(type=="out"&&qxid==""&&hbh!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        } 
                                                        if(type=="in"&&hxid!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                            tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            tempHtml += '<div id="hxhbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;">'+hxhbh+'</div>';
                                                        }else if(type=="in"&&hxid==""&&hbh!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        }
                                                        // 判断航班是否有故障信息，若有则在机型后面添加警告图片
                                                       if(gzObj[i]==""){  
                                                            tempHtml += '<div id="jh'+id+'" class="ub ub-ac" style="margin-left:0.1em;font-size: 0.8125em;font-weight: bold;" onclick="openTodayDuty(\'jh'+id+'\','+id+')" data-key="'+jhqfrq+'" data-jh="'+jh+'" ontouchstart="zy_touch(\'anid-act\')">'+jh+'</div>';
                                                            tempHtml+='<div style="margin:0 0.1em;">/</div>';
                                                            tempHtml+='<div id="jx'+id+'" class="ub ub-ac ub-pc" style="font-size: 0.8125em;">'+jx+'</div>';                                  
                                                       }else{
                                                        tempHtml+='<div class="ub ub-ac" onclick="openTodayDuty(\'jh'+id+'\','+id+')" ontouchstart="zy_touch(\'ani-act\')">';
                                                            tempHtml += '<div id="jh'+id+'" class="ub ub-ac" style="margin-left:0.1em;font-size: 0.8125em;font-weight: bold;" data-key="'+jhqfrq+'" data-jh="'+jh+'">'+jh+'</div>';
                                                            tempHtml+='<div style="margin:0 0.1em;">/</div>';
                                                            tempHtml += '<div class="warnyd ub-img" style="margin-right:0.1em;"></div>';      //航班有故障时的警告图片
                                                            tempHtml+='<div id="jx'+id+'" style="font-size: 0.8125em;" class="ub ub-ac ub-pc">'+jx+'</div>';
                                                        tempHtml+='</div>';
                                                        } 
                                                    tempHtml += '</div>'; 
                                                    tempHtml += '<div class="ub ub-ac ub-f1 ub-pj" style="padding:0 3% 0 0;width: 30%;font-size:0.75em;">';
                                                       tempHtml += '<div class="ub"></div>';
                                                       tempHtml += '<div class="ub ub-ac" style="color:#fd4d80">';
                                                           tempHtml += '<div class="ub-img seats"></div>';
                                                           tempHtml += '<div style="font-weight:bold;">剩余</div>';
                                                           tempHtml += '<div>'+fls+'/</div>';
                                                           tempHtml += '<div style="margin:0 2%;">'+bls+'/</div>';
                                                           tempHtml += '<div style="">'+els+'</div>';
                                                       tempHtml += '<div>';
                                                    tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '<div class="ub ub-ac ub-hor" style="height: 28%;width: 100%;" >';
                                                    tempHtml += '<div id="jhqfjc'+id+'" class="ub ub-f1 ub-ac" style="text-align:center;font-size: 0.78em;font-weight: bold;margin-left:2%;width: 19%;height:90%;" onclick="openCurentDuty(\''+jhqfjc+'\',\''+jhddjc+'\')" ontouchstart="zy_touch(\'ani-act\')">'+jhqfjc+'</div>';
                                                    tempHtml += '<div class="ub ub-f1 ub-ver ulev-4 ub-ac ub-pc" style="width: 52%;margin-left:1%;height:45%;">';
                                                        if(type=="out"){
                                                            tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                                tempHtml += '<div class="qh1 ub-img "></div>';
                                                                tempHtml += '<div class="qf ub-img"></div>';
                                                                tempHtml += '<div id="jhqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+jhqfsj+'/</div>';
                                                                tempHtml += '<div id="yjqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+yjqfsj+'/</div>';
                                                                tempHtml += '<div id="sjqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+sjqfsj+'</div>';
                                                                tempHtml += '<div class="qh2 ub-img"></div>';
                                                            tempHtml += '</div>';
                                                        }else if(type=="in"){
                                                            tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                                tempHtml += '<div class="qh1 ub-img "></div>';
                                                                tempHtml += '<div class="jl ub-img"></div>';
                                                                tempHtml += '<div id="jhddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+jhddsj+'/</div>';
                                                                tempHtml += '<div id="yjddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+yjddsj+'/</div>';
                                                                tempHtml += '<div id="sjddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+sjddsj+'</div>';
                                                                tempHtml += '<div class="qh2 ub-img"></div>';
                                                            tempHtml += '</div>';
                                                        }
                                                        tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                        tempHtml += '</div>';
                                                    tempHtml += '</div>';//中间大块60%配对
                                                    tempHtml += '<div id="jhddjc'+id+'" class="ub ub-f1 ub-ac" style="text-align:center;font-size: 0.78em;font-weight: bold;width: 19%;height:90%;margin-left:1%;" onclick="openCurentDuty(\''+jhqfjc+'\',\''+jhddjc+'\')" ontouchstart="zy_touch(\'ani-act\')">'+jhddjc+'</div>';
                                                    tempHtml += '<div class="ub ub-ac ub-pc ub-f1" style="width:8%;;margin-right:2%;" onclick="openDetailInfo(\'flight'+id+'\')">';
                                                    tempHtml += '<div id="flight'+id+'Img" class="downf ub-img" style="margin-left:5%;"></div>';
                                                    tempHtml += '</div>';
                                                tempHtml += '</div>';//所在行配对
                                                 tempHtml+='<div id="" style="font-size: 0.78em;font-weight: bold;margin-left: 2%;width: 90%;height:12%">'+airport+'</div>';
                                            tempHtml += '</div>';
                                        tempHtml += '</div>';
                                    tempHtml += '</div>';//最大
                                    tempHtml += '<div id="flight'+id+'Detail" class="ub ub-hor" style="width: 100%;height:52%;margin: 0 0 1% 0;display: none !important;">';
                                        tempHtml += '<div class="ub ub-ac ub-pc" style="width: 9%;height: 100%;">';
                                            tempHtml += '<div style="background: #fff;width: 5%;height: 110%;"></div>';
                                        tempHtml += '</div>';
                                        //tempHtml+='<div id="trangle2"></div>';
                                        tempHtml += '<div class="ub ub-ver" style="background: #fff;width: 85%;height: 80%;border-top:1px solid rgba(54,57,92,.7);margin-left:3%">';
                                           tempHtml += '<div class="hbrwTouch ub ub-hor ub-ac" style="width: 100%;overflow: auto;margin: 1% 0;height:30%;">';
                                              if(isDefine(hbrw)){ 
                                                  for(var h = 0;h<hbrw.length;h++){   
                                                      var ss= engorch(hbrw[h].taskname);
                                                       if(biaozhi==0){
                                                                 var ss= hbrw[h].taskname;
                                                        }                                       
                                          if(hbrw[h].status == "0"){
                                         tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw" onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')"  data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>';
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                               if(ss=="航班督查"){
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #1c97e4;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                               }else{
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #1c97e4;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                               }
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>'; 
                                                           tempHtml += '</div>';
                                                      }else if(hbrw[h].status == "1"){                                              
                                                            tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw"  onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')" data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>';
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                               if(ss=="航班督查"){
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #499e3e;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                               }else{
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #499e3e;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                               }
                                                                   
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                      }else if(hbrw[h].status == "2"){                                                  
                                                          tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw"  onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')" data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>';
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                               if(ss=="航班督查"){
                                                                   tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #A03F3F;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                               }else{
                                                                   tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #A03F3F;"></div>';
                                                                    tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                               }
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                      }
                                                  }
                                          } 
                                           tempHtml += '</div>';
                                           //无对外原因则不显示该内容
                                           if(isDefine(dwyy)){    
                                                   if(res==1){ 
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;" ontouchstart="zy_touch(\'ani-act\')" id="dwyy'+id+'">';  
                                                   }else{
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;" ontouchstart="zy_touch(\'ani-act\')" id="dwyy'+id+'" onclick="openProjectDetail(\''+key+'\',\'dwyy'+id+'\')">';    
                                                   };  
                                                   tempHtml += '<div class="warnydlb ub-img"style="margin:0 2%;"></div>';
                                                   tempHtml += '<div style="font-size:1.1em">对外原因:</div>';
                                                   tempHtml += '<div style="font-size:1.1em" data-key="'+key+'">'+dwyy+'</div>';
                                                   tempHtml += '</div>';
                                               }else{
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;display:none !important;" >';
                                                   tempHtml += '<div class="warnyd ub-img"style="margin:0 2%;border:1px solid red;"></div>';
                                                   tempHtml += '<div class="ulev-1">对外原因:</div>';
                                                   tempHtml += '<div class="ulev-1" id="dwyy'+id+'" data-key="'+key+'">'+dwyy+'</div>';
                                                   tempHtml += '</div>';
                                               }
                                                                         
                                    tempHtml += '<div  class="uhide ub-ac ub-hor" style="padding-top:0.6em;padding-bottom:.5em;border-top:1px solid #ccc;height:30%"><div class="ub ub-ac " style="width:39%;background:#1c97e4;padding:.3em 0;margin-left:2%;border-radius:.3em;">';
                                               tempHtml += '<div class="addressList ub-img" style="margin-left:2%;"></div>';
                                               tempHtml += '<div id="jz'+id+'" class="ub ub-f1 ub-ac ub-hor" style="width:70%;" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')" onclick="openWorkDetail(\'jz'+id+'\')">';
                                                   tempHtml += '<div class="ulev-1" style="margin-left:2%;color:#fff">执勤机组通讯录</div>';
                                               tempHtml += '</div></div>';  
                                               tempHtml += '<div class="ub ub-ac" style="width:50%;padding:.12em 0;margin-left:5%;border:1px solid #1c97e4;border-radius:.3em">';
                                                   tempHtml += '<div class="jiZu ub-img" style="margin-left:2%;"></div>';
                                                   tempHtml += '<div id="jz'+id+'"  class="f-wb ulev-1" style="margin:0 1%;;">机组超时 </div>';
                                               if(jz>120||jz==null){
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#29a612;height: 1.5em;width: 80%;">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc ub-f1" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+id+'jzzqani">(>120</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟)</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }else if(jz<30)
                                               {
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#ffffff;background-color:#f00000;border-radius: 0.2em;height: 1.5em;width: 80%">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+i+'jzzqani"><30</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }else if(30<jz<120)
                                               {
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#ffffff;background-color:#ffa200;border-radius: 0.2em;height: 1.5em;width: 80%">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+i+'jzzqani"><120</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }
                                            tempHtml += '</div>';
                                            tempHtml += '</div>';
                                            tempHtml += '</div>';
                                            tempHtml += '</div>';
                                            tempHtml += '</div>';                               
                              
                     }
                     if(refreshType == 0){
                        uexWindow.resetBounceView('0');
                        $$("flighDataInfo").innerHTML = tempHtml+$$("flighDataInfo").innerHTML; 
                        uexWindow.closeToast();
                        fullRefreshFlag = '';
                        
                    }else if(refreshType == 1){
                        uexWindow.resetBounceView('1');
                        $$('flighDataInfo').innerHTML += tempHtml;
                        uexWindow.closeToast();
                    }
                    var MARK=getLocVal("MARK");
                    var ewfw=getLocVal("ewID");
                     if(isDefine(ewfy)){
                        $$(ewfw).style.color="#ffffff";
                        $$(ewfw).style.backgroundColor="#5868b2";
                        if(MARK==1){
                            var ImgId=getLocVal("imgId");
                            $$(ImgId).className="upf ub-img";
                            var DetailId=getLocVal("detailId");
                            $$(DetailId).style.display = "";
                        }
                     }else if((ewfy==undefined)&&(MARK==1)){
                            var ImgId=getLocVal("imgId");
                            $$(ImgId).className="upf ub-img";
                            var DetailId=getLocVal("detailId");
                            $$(DetailId).style.display = "";
                     }
                 } else{
                    uexWindow.toast(0, 5, "没有更多数据！", 2000);
                    pageNo--;
                    uexWindow.resetBounceView('0');
                    uexWindow.resetBounceView('1');
                 }
                 if(pageNo == 1){ //第一页时数据才根据时间定位
                     //获取当前时间的时和分
                     var date = new Date();
                     var hours = check(date.getHours());
                     var minu = check(date.getMinutes());
                     var hm = hours+":"+minu;
                     var flightTimeId = "";
                     //把当前时分放到数据日期数组中，重新排序
                     timeIdArr.push(hm);
                     var timeIdArrStr = timeIdArr.sort();
                     var fot = "";  
                     //重新排序后，拿到当前时分前一个或则后一个下表值作为依据，然后通过下表获取数据id
                     for(var t=0;t < timeIdArrStr.length;t++){
                         if(timeIdArrStr[t] == hm){
                             flightTimeId = timeIdObj[timeIdArrStr[t-1]];
                             if(document.getElementById(flightTimeId)){
                                 fot = document.getElementById(flightTimeId).offsetTop;
                             }
                         }
                     }
                     //定位到当前时间数据
                     window.scroll(0,fot);
                     //清空存储时间的数组，对象，方便选择航站后出现数据问题
                     timeIdArr =[];
                     timeIdObj = {};
                 }
            }, "json",function(err){
               uexWindow.toast(1, 5, '加载数据失败', 500);   
            }); 
            }else{
                
                 yddfProUrl="http://mpservice.ceair.com/mpservice/";
                    if(isDefine(flightno)==true){     
                        dataUrl = yddfProUrl + "system_getInfoList.action?type="+type+"&airport="+airport+"&flightNo="+flightno+"&pageNo="+pageNo+"&date="+dateTime+"&pageSize=10"+"&timezone="+timezone;
                    }else if(isDefine(flightno)==false&&Flag==0){
                        dataUrl = yddfProUrl + "system_getInfoList.action?type="+type+"&airport="+airport+"&date="+dateTime+"&isDefault=1"+"&pageSize=10"+"&timezone="+timezone;
                    }else if(isDefine(flightno)==false&&Flag==1){
                        dataUrl = yddfProUrl + "system_getInfoList.action?type="+type+"&airport="+airport+"&date="+dateTime+"&pageNo="+pageNo+"&pageSize=10"+"&timezone="+timezone;
                    } 
                    console.log(dataUrl);
                    //dataUrl=yddfProUrl+"system_getTaskFlight.action?userName=maoning&date=2016-06-29"
                    console.log(dataUrl); 
                    uexWindow.toast(1, 5, '正在加载数据...', -1);
                    $.getJSON(dataUrl, function(data){  
                        console.log(JSON.stringify(data)+"TTTTT");
                         pageNo=data.pageNo;
                         maxPageNo=data.pageCount;
                         pageNum.push(pageNo);
                         var datajson=data;
                         //var Num=pageNum.sort();
                         var data=data.array;
                         if(data.length > 0){
                            var tempHtml = "";
                            //console.log(JSON.stringify(data));
                             for(var i = 0;i < data.length;i++){
                                 if(datajson.airport=="SFO"||datajson.airport=="SEA"||datajson.airport=="ORD"||datajson.airport=="YVR"||datajson.airport=="LAX"||datajson.airport=="YYZ"){
                                        var biaozhi=0;
                                 }else{
                                        var biaozhi=1;
                                 }
                                 timeIdObj[data[i].jhqfsj] = "flight"+i+"List";
                                 timeIdArr.push(data[i].jhqfsj);
                                 airportInfoObj[data[i].key]= data[i];                         
                                 var d = data[i],
                                 key = isDefine(d.key) ? d.key : "",
                                 jhqfsj = isDefine(d.jhqfsj) ? d.jhqfsj : "",                                 //"jhqfsj": "09:05",   //计划起飞时间
                                 jhqfrq = isDefine(d.jhqfrq) ? d.jhqfrq : "", 
                                 hbh = isDefine(d.hbh) ? d.hbh : "",                                        //"hbh": "MU2104",   //航班号
                                 jh = isDefine(d.jh) ? d.jh : "",                                                 //"jh": "B1837", //机号
                                 jx = isDefine(d.jx) ? d.jx : "",                                                 //"jx": "B6097"  //机型
                                 fls = isDefine(d.fls) ? d.fls : "",                                          //头等舱
                                 bls = isDefine(d.bls) ? d.bls : "",                                          //商务舱                                  
                                 els = isDefine(d.els) ? d.els : "",                                          //经济舱
                                 zt = isDefine(d.zt) ? d.zt : "",                                                //"zt": "到达",   //航班状态
                                 cyr = isDefine(d.cyr) ? d.cyr : "",                                            //承运人
                                 hb = isDefine(d.hb) ? d.hb : "", 
                                 ewfy=d.ewfy,                                            //航班名
                                 thyy = isDefine(d.thyy) ? d.thyy : "无",                                  //不正常航班上报处置方案退回原因
                                 qxzt = isDefine(d.qxzt) ? d.qxzt : "",                                   //"qxzt": "已到达",   //前序航班状态
                                 hxzt = isDefine(d.hxzt) ? d.hxzt : "",
                                 qxid = isDefine(d.qxid) ? d.qxid : "",                                   //前序航班号id
                                 hxid = isDefine(d.hxid) ? d.hxid : "",
                                 id = isDefine(d.id) ? d.id : "",                                              //本航班号id
                                 jhqfjc = isDefine(d.jhqfjc) ? d.jhqfjc : "",                             //"jhqfjc": "北京首都",  //计划起飞机场
                                 jhddjc = isDefine(d.jhddjc) ? d.jhddjc : "",                          //"jhddjc": "西安咸阳",  //计划到达机场
                                 yjqfsj = isDefine(d.yjqfsj) ? d.yjqfsj : "",                              //"yjqfsj": "09:05", //预计起飞时间
                                 sjqfsj = isDefine(d.sjqfsj) ? d.sjqfsj : "",                              //"sjqfsj": "",  //实际起飞时间
                                 dwyyid = isDefine(d.dwyyid) ? d.dwyyid : "",         
                                 dwyylegid = isDefine(d.dwyylegid) ? d.dwyylegid : "",
                                 dwyy =  d.dwyy,
                                 res = d.res,
                                 dwyyjg = isDefine(d.dwyyjg) ? d.dwyyjg : "",                     //对外原因结果
                                 qxid = isDefine(d.qxid) ? d.qxid : "",                                 //"qxid": "77073171",  //前序id
                                 qxhbh = isDefine(d.qxhbh) ? d.qxhbh : "",                       //"qxhbh": "MU2104", //前序航班号
                                 qxqfjc = isDefine(d.qxqfjc) ? d.qxqfjc : "",                        //"qxqfjc": "北京首都", //前序起飞机场
                                 qxddjc = isDefine(d.qxddjc) ? d.qxddjc : "",
                                 hxhbh = isDefine(d.hxhbh) ? d.hxhbh : "",                       //"qxhbh": "MU2104", //前序航班号
                                 hxqfjc = isDefine(d.hxqfjc) ? d.hxqfjc : "",                        //"qxqfjc": "北京首都", //前序起飞机场
                                 hxddjc = isDefine(d.hxddjc) ? d.hxddjc : "",                     //"qxddjc": "西安咸阳" //前序到达机场
                                 jhddsj = isDefine(d.jhddsj) ? d.jhddsj : "",                         //计划到达时间    
                                 yjddsj = isDefine(d.yjddsj) ? d.yjddsj : "",                        
                                 sjddsj = isDefine(d.hjddsj) ? d.sjddsj : "",                          //实际到达时间
                                 jz = d.jz,                                                           //机组
                                 hbrw = isDefine(d.hbrw) ? d.hbrw : "";                            //航班任务
                                 hbrwObj["flight"+id+"hbrw"] = hbrw;
                                 cs=isDefine(d.cs) ? d.cs : "";                                           //餐食信息
                                 csObj["flight"+id+"cs"] = cs;
                                 gz = isDefine(d.gz) ? d.gz : "";                                       //航班任务
                                 gzObj[i] = gz;
                                 setLocVal("thyy",thyy);
                                 tempHtml += '<div id="flight'+id+'List" data-timeflag="'+jhqfsj+'" class="ub ub-ver" style="color: #36395C;width: 100%;height:30%;margin-top: 1%;">';
                                        tempHtml += '<div class="ub ub-ac ub-hor" style="width: 100%;height: 100%;">';
                                            tempHtml += '<div class="ub ub-ver ub-ac" style="width: 9%;height: 100%; ">';
                                                if(type=="out"){
                                                    tempHtml += '<div id="jhqfsj'+id+'" class="ub ub-ac ub-pc" style="background: #fff;width: 2.5em;height: 2.5em;border-radius: 100%;margin-top: 10%;font-weight: bold;font-size: 0.65em;padding: 0.2em;"><a href="#top" mce_href="#top" style="text-decoration: none;color:#0f4b65;">'+jhqfsj+'</a> </div>';
                                                }else if(type=="in"){
                                                    //tempHtml += '<div id="jhddsj'+id+'" class="ub ub-ac ub-pc" style="background: #fff;width: 2.5em;height: 2.5em;border-radius: 100%;margin-top: 10%;font-weight: bold;font-size: 0.65em;padding: 0.2em;"><a href="#top" mce_href="#top" style="text-decoration: none;color:#0f4b65;">'+jhddsj+'</a> </div>';
                                                    tempHtml += '<div id="jhqfsj'+id+'" class="ub ub-ac ub-pc" style="background: #fff;width: 2.5em;height: 2.5em;border-radius: 100%;margin-top: 10%;font-weight: bold;font-size: 0.65em;padding: 0.2em;"><a href="#top" mce_href="#top" style="text-decoration: none;color:#0f4b65;">'+jhqfsj+'</a> </div>';
                                                }
                                                 tempHtml += '<div style="background: #fff;width: 5%;height: 80%;"></div>';
                                            tempHtml += '</div>';
                                            tempHtml+='<div  style="width:3%;position:relative"><div class="trangle"></div></div>';
                                             tempHtml += '<div id="flight'+id+'Br" class="ub ub-ver ub-ac" style="background: #fff;width: 85%;height: 100%;border-right: 2px solid #53a55d;">';
                                             
                                             tempHtml += '<div class="ub ub-hor ub-ac ub-ver" style="width:99%;height:30%">';
                                           tempHtml += '<div class="leftyd ub-img" style="margin-left:2%;"></div>'; 
                                           tempHtml +='<div id="qxid'+id+'" class="ub ub-hor ub-ac"  ontouchstart="zy_touch(\'ani-act\')"  onclick="openFlightInfor(\'qxid'+id+'\')"  data-key="'+jhqfrq+'" data-qxid="'+qxid+'">';
                                               tempHtml += '<div class="ub ub-hor ub-ac " >';
                                                   // tempHtml += '<div class="leftyd ub-img" style="margin-left:2%;"></div>';                                                                                  
                                                   //tempHtml += '<div class="ulev-1" style="margin-left:2%;">前序</div>';
                                                   if(type=="out"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">前序</div>';
                                                   }else if(type=="in"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">后序</div>';
                                                   }
                                                   if(type=="out"&&qxhbh==""){
                                                       tempHtml += '<div id="qxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="out"&&qxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+qxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml+='</div>';//82%配对
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(qxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                                 //tempHtml += '</div>';
                                                 
                                               }else if(qxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(qxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc "style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">('+qxzt+')</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }else if(type=="in"&&hxhbh==""){
                                                       tempHtml += '<div id="hxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="in"&&hxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+hxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '<div class="ub ub-ac" style="width: 60%;margin-left:15%;">';
                                                   tempHtml += '<div id="hxqfjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:right;">'+hxqfjc+'</div>';
                                                   tempHtml +='</div>';
                                                           tempHtml += '<div>-</div>';                                                   
                                                   tempHtml += '<div id="hxddjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:left;">'+hxddjc+'</div>';
                                                   tempHtml +='</div>';
                                               tempHtml += '</div>';//70%配对
                                               tempHtml+='</div>';//82%配对
                                                
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(hxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                                 //tempHtml += '</div>';
                                                 
                                               }else if(hxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(hxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1" style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }  
                                             
                                                tempHtml += '<div class="ub ub-ac ub-pj" style="height: 30%;width: 100%;">';
                                                     tempHtml += '<div class="ub ub-ac ub-hor ub-f1" style="width: 70%;">';
                                                        //tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:4em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        if(type=="out"&&qxid!=""){ 
                                                            tempHtml += '<div id="qxhbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#ccc;;border-radius:0.3em;">'+qxhbh+'</div>';
                                                            tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;padding:0.2em;width:3.8em;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        }else if(type=="out"&&qxid==""&&hbh!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                            //tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            //tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;padding:0.2em;width:4em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        } 
                                                        if(type=="in"&&hxid!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.78em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                            tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            tempHtml += '<div id="hxhbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;">'+hxhbh+'</div>';
                                                        }else if(type=="in"&&hxid==""&&hbh!=""){
                                                            tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;margin: 0 0 0 2%;padding:0.2em;width:3.8em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                            //tempHtml += '<div style="margin:0 0.1em">/</div>';
                                                            //tempHtml += '<div id="hbh'+id+'" class="ub ub-pc" style="font-size: 0.8125em;font-weight: bold;padding:0.2em;width:4em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+id+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        }
                                                        //tempHtml += '<div style="margin:0 0.2em;">/</div>';
                                                        //tempHtml += '<div id="hbh'+i+'" class="ub ub-pc" style="margin-left:0.2em;font-size: 0.8125em;font-weight: bold;padding:0.2em;width:4em;background-color:#4881cb;color:white;border-radius:0.3em;" onclick="openAllFlightInfo(\'hbh'+i+'\')" data-key="'+jhqfrq+'" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')">'+hbh+'</div>';
                                                        // 判断航班是否有故障信息，若有则在机型后面添加警告图片
                                                       if(gzObj[i]==""){  
                                                            tempHtml += '<div id="jh'+id+'" class="ub ub-ac" style="margin-left:0.1em;font-size: 0.8125em;font-weight: bold;" onclick="openTodayDuty(\'jh'+id+'\','+id+')" data-key="'+jhqfrq+'" data-jh="'+jh+'" ontouchstart="zy_touch(\'anid-act\')">'+jh+'</div>';
                                                            tempHtml+='<div style="margin:0 0.1em;">/</div>';
                                                            tempHtml+='<div id="jx'+id+'" class="ub ub-ac ub-pc" style="font-size: 0.8125em;">'+jx+'</div>';                                  
                                                       }else{
                                                        tempHtml+='<div class="ub ub-ac" onclick="openTodayDuty(\'jh'+id+'\','+id+')" ontouchstart="zy_touch(\'ani-act\')">';
                                                            tempHtml += '<div id="jh'+id+'" class="ub ub-ac" style="margin-left:0.1em;font-size: 0.8125em;font-weight: bold;" data-key="'+jhqfrq+'" data-jh="'+jh+'">'+jh+'</div>';
                                                            tempHtml+='<div style="margin:0 0.1em;">/</div>';
                                                            tempHtml += '<div class="warnyd ub-img" style="margin-right:0.1em;"></div>';      //航班有故障时的警告图片
                                                            tempHtml+='<div id="jx'+id+'" style="font-size: 0.8125em;" class="ub ub-ac ub-pc">'+jx+'</div>';
                                                        tempHtml+='</div>';
                                                        } 
                                                    tempHtml += '</div>'; 
                                                    tempHtml += '<div class="ub ub-ac ub-f1 ub-pj" style="padding:0 3% 0 0;width: 30%;font-size:0.75em;">';
                                                       tempHtml += '<div class="ub"></div>';
                                                       tempHtml += '<div class="ub ub-ac" style="color:#fd4d80">';
                                                           tempHtml += '<div class="ub-img seats"></div>';
                                                           tempHtml += '<div style="font-weight:bold;">剩余</div>';
                                                           tempHtml += '<div>'+fls+'/</div>';
                                                           tempHtml += '<div style="margin:0 2%;">'+bls+'/</div>';
                                                           tempHtml += '<div style="">'+els+'</div>';
                                                       tempHtml += '<div>';
                                                    tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '</div>';
                                                tempHtml += '<div class="ub ub-ac ub-hor" style="height: 28%;width: 100%;" >';
                                                    tempHtml += '<div id="jhqfjc'+id+'" class="ub ub-f1 ub-ac" style="text-align:center;font-size: 0.78em;font-weight: bold;margin-left:2%;width: 19%;height:90%;" onclick="openCurentDuty(\''+jhqfjc+'\',\''+jhddjc+'\')" ontouchstart="zy_touch(\'ani-act\')">'+jhqfjc+'</div>';
                                                    tempHtml += '<div class="ub ub-f1 ub-ver ulev-4 ub-ac ub-pc" style="width: 52%;margin-left:1%;height:45%;">';
                                                        if(type=="out"){
                                                            tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                                tempHtml += '<div class="qh1 ub-img "></div>';
                                                                tempHtml += '<div class="qf ub-img"></div>';
                                                                tempHtml += '<div id="jhqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+jhqfsj+'/</div>';
                                                                tempHtml += '<div id="yjqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+yjqfsj+'/</div>';
                                                                tempHtml += '<div id="sjqfsj'+id+'" class="f-wb" style="opacity: 0.7;">'+sjqfsj+'</div>';
                                                                tempHtml += '<div class="qh2 ub-img"></div>';
                                                            tempHtml += '</div>';
                                                        }else if(type=="in"){
                                                            tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                                tempHtml += '<div class="qh1 ub-img "></div>';
                                                                tempHtml += '<div class="jl ub-img"></div>';
                                                                tempHtml += '<div id="jhddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+jhddsj+'/</div>';
                                                                tempHtml += '<div id="yjddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+yjddsj+'/</div>';
                                                                tempHtml += '<div id="sjddsj'+id+'" class="f-wb" style="opacity: 0.7;">'+sjddsj+'</div>';
                                                                tempHtml += '<div class="qh2 ub-img"></div>';
                                                            tempHtml += '</div>';
                                                        }
                                                        tempHtml += '<div class="ub ub-ac ub-hor ub-pc">';
                                                           /*if(type=="out"){
                                                                if(zt.indexOf("到达")>-1){
                                                                      tempHtml += '<div style="color:#14AA54;">'+zt+'</div>';
                                                                }else if(zt.indexOf("起飞")=='0'){
                                                                      tempHtml += '<div style="color:#14AA54;">'+zt+'</div>';
                                                                }else{
                                                                      tempHtml += '<div style="color:#FE9002;">'+zt+'</div>';
                                                                }
                                                           }else  if(type=="in"){
                                                               if(zt.indexOf("到达")>-1){
                                                                  tempHtml += '<div style="color:#14AA54;">本站已'+zt+'</div>';
                                                            }else if(zt.indexOf("起飞")=='0'){
                                                                  tempHtml += '<div style="color:#14AA54;">前站已'+zt+'</div>';
                                                            }else{
                                                                  tempHtml += '<div style="color:#FE9002;">前站'+zt+'</div>';
                                                            }
                                                           }
                                                           */
                                                        tempHtml += '</div>';
                                                    tempHtml += '</div>';//中间大块60%配对
                                                    tempHtml += '<div id="jhddjc'+id+'" class="ub ub-f1 ub-ac" style="text-align:center;font-size: 0.78em;font-weight: bold;width: 19%;height:90%;margin-left:1%;" onclick="openCurentDuty(\''+jhqfjc+'\',\''+jhddjc+'\')" ontouchstart="zy_touch(\'ani-act\')">'+jhddjc+'</div>';
                                                    tempHtml += '<div class="ub ub-ac ub-pc ub-f1" style="width:8%;;margin-right:2%;" onclick="openDetailInfo(\'flight'+id+'\')">';
                                                    tempHtml += '<div id="flight'+id+'Img" class="downf ub-img" style="margin-left:5%;"></div>';
                                                    tempHtml += '</div>';
                                                tempHtml += '</div>';//所在行配对
                                                 tempHtml+='<div id="" style="font-size: 0.78em;font-weight: bold;margin-left: 2%;width: 90%;height:12%">'+airport+'</div>';
                                            tempHtml += '</div>';
                                        tempHtml += '</div>';
                                    tempHtml += '</div>';//最大
                                    tempHtml += '<div id="flight'+id+'Detail" class="ub ub-hor" style="width: 100%;height:52%;margin: 0 0 1% 0;display: none !important;">';
                                        tempHtml += '<div class="ub ub-ac ub-pc" style="width: 9%;height: 100%;">';
                                            tempHtml += '<div style="background: #fff;width: 5%;height: 110%;"></div>';
                                        tempHtml += '</div>';
                                        //tempHtml+='<div id="trangle2"></div>';
                                        tempHtml += '<div class="ub ub-ver" style="background: #fff;width: 85%;height: 100%;border-top:1px solid rgba(54,57,92,.7);margin-left:3%">';
                                           tempHtml += '<div class="hbrwTouch ub ub-hor ub-ac" style="width: 100%;overflow: auto;margin: 1% 0;height:30%;">';
                                              if(isDefine(hbrw)){
                                                  for(var h = 0;h<hbrw.length;h++){   
                                                      var ss= engorch(hbrw[h].TASKNAME);
                                                       if(biaozhi==0){
                                                                 var ss= hbrw[h].TASKNAME;
                                                        }                                       
                                          if(hbrw[h].status == "0"){
                                         tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw" onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')"  data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>'
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #1c97e4;"></div>';
                                                                    if(ss=="航班督查"){
                                                                        tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                                    }else{
                                                                        tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                                    }
                                                                    
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>'; 
                                                           tempHtml += '</div>';
                                                      }else if(hbrw[h].status == "1"){                                              
                                                            tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw"  onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')" data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>';
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #499e3e;"></div>';
                                                                    if(ss=="航班督查"){
                                                                        tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                                    }else{
                                                                        tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                                    }
                                                                    
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                      }else if(hbrw[h].status == "2"){                                                  
                                                          tempHtml += '<div class="ub ub-hor ub-ac ub-pc" style="width: 32%;margin-left: 2%;" id="flight'+id+'hbrw"  onclick="openHBRW(\'flight'+id+'hbrw\',\'flight'+id+'Img\',\'flight'+id+'Detail\','+biaozhi+')" data-hbn="'+hbh+'" data-jh="'+jh+'" data-jx="'+jx+'" data-jw="'+hbrw[h].jw+'" data-key="'+key+'">';
                                                           tempHtml += '<div class="ub ub-ver" style="">';
                                                               tempHtml += '<div style="font-size:0.8em;">'+ss+'</div>';
                                                               tempHtml += '<div class="ub ub-ac" style="width:100%;">';
                                                                    tempHtml += '<div style="width: 1em;height: 1em;border-radius: 100%;background: #A03F3F;"></div>';
                                                                   if(ss=="航班督查"){
                                                                       tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 200%;"></div>';
                                                                   }else{
                                                                       tempHtml += '<div style="background: #1c97e4;height: 0.1em;width: 400%;"></div>';
                                                                   }
                                                                    
                                                               tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                           tempHtml += '</div>';
                                                      }
                                                  }
                                          } 
                                           tempHtml += '</div>';
                                           //无对外原因则不显示该内容
                                           
                                           if(isDefine(dwyy)){    
                                                   if(res==1){ 
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;" ontouchstart="zy_touch(\'ani-act\')" id="dwyy'+id+'">';  
                                                   }else{
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;" ontouchstart="zy_touch(\'ani-act\')" id="dwyy'+id+'" onclick="openProjectDetail(\''+key+'\',\'dwyy'+id+'\')">';    
                                                   };  
                                                   tempHtml += '<div class="warnydlb ub-img"style="margin:0 2%;"></div>';
                                                   tempHtml += '<div style="font-size:1.1em">对外原因:</div>';
                                                   tempHtml += '<div style="font-size:1.1em" data-key="'+key+'">'+dwyy+'</div>';
                                                   tempHtml += '</div>';
                                               }else{
                                                   tempHtml += '<div class="ub ub-hor ub-ac" style="height:1.5em;display:none !important;" >';
                                                   tempHtml += '<div class="warnyd ub-img"style="margin:0 2%;border:1px solid red;"></div>';
                                                   tempHtml += '<div class="ulev-1">对外原因:</div>';
                                                   tempHtml += '<div class="ulev-1" id="dwyy'+id+'" data-key="'+key+'">'+dwyy+'</div>';
                                                   tempHtml += '</div>';
                                               }
                                           /*ltempHtml += '<div class="ub ub-hor ub-ac ub-ver" style="">';
                                           tempHtml += '<div class="leftyd ub-img" style="margin-left:2%;"></div>'; 
                                           tempHtml +='<div id="qxid'+id+'" class="ub ub-hor ub-ac ub-f1" style="width:82%;" ontouchstart="zy_touch(\'ani-act\')"  onclick="openFlightInfor(\'qxid'+id+'\')"  data-key="'+jhqfrq+'" data-qxid="'+qxid+'">';
                                               tempHtml += '<div class="ub ub-hor ub-ac ub-f1" style="width:30%;">';
                                                   // tempHtml += '<div class="leftyd ub-img" style="margin-left:2%;"></div>';                                                                                  
                                                   //tempHtml += '<div class="ulev-1" style="margin-left:2%;">前序</div>';
                                                   if(type=="out"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">前序</div>';
                                                   }else if(type=="in"){
                                                       tempHtml += '<div class="ulev-1" style="margin-left:2%;">后序</div>';
                                                   }
                                                   if(type=="out"&&qxhbh==""){
                                                       tempHtml += '<div id="qxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="out"&&qxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+qxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '<div class="ub ub-ac" style="width: 60%;margin-left:15%;">';
                                                   tempHtml += '<div id="qxqfjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:right;">'+qxqfjc+'</div>';
                                                   tempHtml +='</div>';
                                                           tempHtml += '<div>-</div>';                                                   
                                                   tempHtml += '<div id="qxddjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:left;">'+qxddjc+'</div>';
                                                   tempHtml +='</div>';
                                               tempHtml += '</div>';//70%配对
                                               tempHtml+='</div>';//82%配对
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(qxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                                 //tempHtml += '</div>';
                                                 
                                               }else if(qxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+qxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(qxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+qxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">'+qxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }else if(type=="in"&&hxhbh==""){
                                                       tempHtml += '<div id="hxhbh'+id+'" class="ulev-1" style="margin-left:2%">无</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                       tempHtml += '</div>';
                                                   }else if(type=="in"&&hxhbh!=""){tempHtml += '<div id="qxhbh'+id+'" class="ulev-1">'+hxhbh+'</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '<div class="ub ub-ac" style="width: 60%;margin-left:15%;">';
                                                   tempHtml += '<div id="hxqfjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:right;">'+hxqfjc+'</div>';
                                                   tempHtml +='</div>';
                                                           tempHtml += '<div>-</div>';                                                   
                                                   tempHtml += '<div id="hxddjc'+id+'" class="ulev-1 ub ub-ac ub-pc ub-f1" style="width:45%;">';
                                                   tempHtml +='<div style="width: 100%;text-align:left;">'+hxddjc+'</div>';
                                                   tempHtml +='</div>';
                                               tempHtml += '</div>';//70%配对
                                               tempHtml+='</div>';//82%配对
                                                
                                                  // 若无前序航班，则前序状态不显示；若存在，则显示前序航班的状态(未起飞、起飞、到达)，其中未起飞状态包含：延误、取消等多种状态
                                               if(hxzt==""){
                                                tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;"></div>';
                                                 tempHtml += '</div>';
                                                 //tempHtml += '</div>';
                                                 
                                               }else if(hxzt.indexOf("到达")>-1){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else if(hxzt.indexOf("起飞")=='0'){
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#14AA54;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }else{
                                                     tempHtml += '<div class="ub ub-ver ub-ac ub-pc ub-f1"style="width: 18%;">';
                                                     tempHtml += '<div style="color:#FE9002;font-size:0.8em;">'+hxzt+'</div>';
                                                     tempHtml += '</div>';//动态图div配对
                                                     tempHtml += '</div>';//与前序配对
                                                 }
                                            }  */
                                    tempHtml += '<div  class="ub ub-ac ub-hor" style="padding-top:0.6em;padding-bottom:.5em;border-top:1px solid #ccc;height:30%"><div class="ub ub-ac " style="width:39%;background:#1c97e4;padding:.3em 0;margin-left:2%;border-radius:.3em;">';
                                               tempHtml += '<div class="addressList ub-img" style="margin-left:2%;"></div>';
                                               tempHtml += '<div id="jz'+id+'" class="ub ub-f1 ub-ac ub-hor" style="width:70%;" data-id="'+id+'" ontouchstart="zy_touch(\'ani-act\')" onclick="openWorkDetail(\'jz'+id+'\')">';
                                                   // tempHtml += '<div class="addressList ub-img" style="margin-left:2%;border:1px solid red;"></div>';
                                                   tempHtml += '<div class="ulev-1" style="margin-left:2%;color:#fff">执勤机组通讯录</div>';
                                               tempHtml += '</div></div>';  
                                               tempHtml += '<div class="ub ub-ac" style="width:50%;padding:.12em 0;margin-left:5%;border:1px solid #1c97e4;border-radius:.3em">';
                                                   tempHtml += '<div class="jiZu ub-img" style="margin-left:2%;"></div>';
                                                   tempHtml += '<div id="jz'+id+'"  class="f-wb ulev-1" style="margin:0 1%;;">机组超时 </div>';
                                               if(jz>120||jz==null){
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#29a612;height: 1.5em;width: 80%;">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc ub-f1" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+id+'jzzqani">(>120</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟)</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }else if(jz<30)
                                               {
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#ffffff;background-color:#f00000;border-radius: 0.2em;height: 1.5em;width: 80%">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+i+'jzzqani"><30</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }else if(30<jz<120)
                                               {
                                                   tempHtml += '<div class="ub ub-f1" style="margin:0 0.2em;font-weight:bold;color:#ffffff;background-color:#ffa200;border-radius: 0.2em;height: 1.5em;width: 80%">';
                                                   tempHtml += '<div class="ulev-1 ub ub-ac ub-pc" id="flight'+id+'jzzq" style="width: 100%">';
                                                       tempHtml += '<div id="flight'+i+'jzzqani"><120</div>';
                                                       tempHtml += '<div style="margin-left:0.2em;">分钟</div>';
                                                   tempHtml += '</div>';
                                               tempHtml += '</div>';
                                               }
                                           tempHtml += '</div>';
                                           
                                               tempHtml += '</div>';
                                              
                                    tempHtml += '</div>';
                                    
                                            tempHtml += '</div>';
                                            tempHtml += '</div>';
                             }
                             if(refreshType == 0){
                                uexWindow.resetBounceView('0');
                                //$$("flighDataInfo").innerHTML = tempHtml;
                                $$("flighDataInfo").innerHTML = tempHtml+$$("flighDataInfo").innerHTML; 
                                uexWindow.closeToast();
                                fullRefreshFlag = '';
                                
                            }else if(refreshType == 1){
                                uexWindow.resetBounceView('1');
                                $$('flighDataInfo').innerHTML += tempHtml;
                                uexWindow.closeToast();
                                
                                //$$('flighDataInfo').innerHTML = tempHtml;
                                
                                
                            }
                            var MARK=getLocVal("MARK");
                            var ewfw=getLocVal("ewID");
                             if(isDefine(ewfy)){
                                $$(ewfw).style.color="#ffffff";
                                $$(ewfw).style.backgroundColor="#5868b2";
                                if(MARK==1){
                                    var ImgId=getLocVal("imgId");
                                    $$(ImgId).className="upf ub-img";
                                    var DetailId=getLocVal("detailId");
                                    $$(DetailId).style.display = "";
                                }
                             }else if((ewfy==undefined)&&(MARK==1)){
                                // $$(ewfw).style.color="#ffffff";
                                // $$(ewfw).style.backgroundColor="#5868b2";
                                // if(MARK==1){
                                    var ImgId=getLocVal("imgId");
                                    $$(ImgId).className="upf ub-img";
                                    var DetailId=getLocVal("detailId");
                                    $$(DetailId).style.display = "";
                                //}
                             }
                         } else{
                            uexWindow.toast(0, 5, "没有更多数据！", 2000);
                            pageNo--;
                            uexWindow.resetBounceView('0');
                            uexWindow.resetBounceView('1');
                         }
                         if(pageNo == 1){ //第一页时数据才根据时间定位
                             //获取当前时间的时和分
                             var date = new Date();
                             var hours = check(date.getHours());
                             var minu = check(date.getMinutes());
                             var hm = hours+":"+minu;
                             var flightTimeId = "";
                             //把当前时分放到数据日期数组中，重新排序
                             timeIdArr.push(hm);
                             var timeIdArrStr = timeIdArr.sort();
                             var fot = "";  
                             //重新排序后，拿到当前时分前一个或则后一个下表值作为依据，然后通过下表获取数据id
                             for(var t=0;t < timeIdArrStr.length;t++){
                                 if(timeIdArrStr[t] == hm){
                                     flightTimeId = timeIdObj[timeIdArrStr[t-1]];
                                     if(document.getElementById(flightTimeId)){
                                         fot = document.getElementById(flightTimeId).offsetTop;
                                     }
                                 }
                             }
                             //定位到当前时间数据
                             window.scroll(0,fot);
                             //清空存储时间的数组，对象，方便选择航站后出现数据问题
                             timeIdArr =[];
                             timeIdObj = {};
                         }
                    }, "json",function(err){
                       uexWindow.toast(1, 5, '加载数据失败', 500);   
                    }); 
            }
            
        }
        function check(myDate){
            if(myDate <　10){
            myDate= "0" + myDate;
            }
            return myDate;
        }
        function datePicker(){
                var date= new Date();
                var year = check(date.getFullYear());
                var month = check(date.getMonth() + 1);
                var days = check(date.getDate());
                uexControl.openDatePicker(year,month,days);
        }
        function initDatePicker(id){
            //初始化ios原生日期选择框
                var cText = 0;
                var cJson = 1;
                var cInt = 2;
                //Flag=1;
                uexControl.cbOpenDatePicker=function(opCode,dataType,data){
                    switch(dataType){
                        case cText:
                          //alert("uex.cText");
                          break;
                        case cJson:
                          if(dataType==1){
                            var obj = eval('('+data+')');
                            var date= new Date();
                            var year = date.getFullYear();
                            var month = date.getMonth() + 1;
                            var days = date.getDate();
                            var dd = new Date(); 
                            var year = dd.getFullYear();
                            var month = dd.getMonth() + 1;
                            var days = dd.getDate();
                            dd.setDate(dd.getDate()-1);//获取昨天的日期 
                            var y = dd.getFullYear(); 
                            var m = (dd.getMonth()+1);//获取当前月份的日期
                            var d = dd.getDate(); //获取当前几号
                            var dd1 = new Date(); 
                            dd1.setDate(dd1.getDate()-2);//获取前天的日期 
                            var y1 = dd1.getFullYear(); 
                            var m1 = (dd1.getMonth()+1);//获取当前月份的日期
                            var d1 = dd1.getDate(); //获取当前几号
                            Flag=0;
                            if((d==obj.day&&y==obj.year&&m==obj.month)||(d1==obj.day&&y1==obj.year&&m1==obj.month)||(days==obj.day&&year==obj.year&&month==obj.month)){
                                var year= obj.year;
                                var yearStr = year.toString();
                                var month=check(obj.month);
                                var day=check(obj.day);
                                //Flag=1;
                                setLocVal("Year",yearStr);
                                $$(id).innerHTML = yearStr.substr(2,2)+"/"+month+"/"+day;
                            }else{
                                alert("只能选择近三天数据");
                                var date= new Date();
                                var year = check(date.getFullYear());
                                var month = check(date.getMonth() + 1);
                                var days = check(date.getDate());
                                var Year=JSON.stringify(year);
                                setLocVal("Year",Year);
                                $$(id).innerHTML=Year.substr(2,2)+"/"+month+"/"+days;
                                //$$(id).innerHTML = yearStr.substr(2,2)+"/"+month+"/"+day;
                            }
                            $$("flighDataInfo").innerHTML = "";
                            pageNum=[];
                            airportSearch();
                            queryCurrentAirport();
                        }
                        break;
                      case cInt:
                        //alert("uex.cInt");
                        break;
                      default:
                        //alert("error");
                   }
                    
                };
                //queryAirPortInfo();
            }
        
        /**
         *打开选着后的机场当天航班信息 
         */
         function openCurentDuty(DPortc,APortc){
            var DPorte = airportObj[DPortc];
            var APorte = airportObj[APortc];
            var airpObj = [DPortc,APortc,DPorte,APorte];
            localStorage["airpObj"] = JSON.stringify(airpObj);
            openNewWin("todayFlightMessage","todayFlightMessage.html");
        } 
         /* 
         * 酒店查询
         */
        function orderHT(){ 
            //openNewWin("Bookinghotel_win","Bookinghotel_win.html");
             uexWindow.evaluateScript('today', '0', 'openTab("酒店查询")');
        }
        /**
         *点击对外原因跳转至上报处置方案 
         */
        function openProjectDetail(key,id){
            setLocVal("dwId",id); 
            var flightData = airportInfoObj[key];
            setLocVal("flightData",JSON.stringify(flightData));
            openNewWin("shangBaoProject2","shangBaoProject2.html");
        }
        /**
         *点击餐食信息跳转至餐食信息页面
         */
        function openMeatInfo(id){
            //点击时改变字体和背景色
            $$(id).style.color="#ffffff";
            $$(id).style.backgroundColor="#5868b2";
            $$("airportFlight").value="";
            var hbh= $$(id).getAttribute("data-flightNo");
            setLocVal("hbh",hbh);
            var cs = csObj[id];
            if(cs==""){
                alert("餐食信息为空！");
                $$(id).style.color="#5868b2";
                $$(id).style.backgroundColor="";
            }else
            {
                setLocVal("cs",JSON.stringify(cs));
                openNewWin("MU211","MU211.html");
                setLocVal("MeatID",id);
            } 
        }
        /**
         *点击额外服务费用跳转至额外服务费用页面
         */
        function openExtraServiceExpense(key,id,Imgid,openDetailID){
            //点击时改变字体和背景色 
            $$(id).style.color="#ffffff";
            $$(id).style.backgroundColor="#5868b2";
            //获取当前航站的三字码,并存储
            var chAirport=$$("airportText").innerHTML;
            var enAirport = airportObj[chAirport];
            setLocVal("enAirport",enAirport);
            var supplyData = airportInfoObj[key];
            console.log("ewData:"+JSON.stringify(supplyData));
            setLocVal("supplyData",JSON.stringify(supplyData));  
            //setLocVal("photoId",Imgid);               //切换图片id
            //setLocVal("detailDivId",openDetailID);    //展开div的id
            setLocVal("imgId",Imgid);//切换图片id 
            setLocVal("detailId",openDetailID);//展开div的id
            setLocVal("ewID",id);//该div所在id,旨在 额外服务费用在今天页面区分是否填过单据 填过有背景色 和字色
            setLocVal("dptAirportCode",airportObj[supplyData.jhqfjc]);
            setLocVal("arrAirportCode",airportObj[supplyData.jhddjc]);
            openNewWin("ew","ew.html");
        } 
        /**
         *点击超售上报跳转至超售上报页面
         */ 
        function openOverSaleInfo(key,id){  
                //点击时改变字体和背景色 
                $$(id).style.color="#ffffff"; 
                $$(id).style.backgroundColor="#5868b2";
                $$("airportFlight").value="";
                var cssbdata = airportInfoObj[key];
                setLocVal("airportObj",JSON.stringify(airportObj));
                setLocVal("cssbdata",JSON.stringify(cssbdata));
                openNewWin("cssb","cssb.html"); 
                setLocVal("OverSaleID",id);
            
        }
          
        /**
         * 点击遣返旅客、超售上报、餐食信息页面后 返回今天页面不刷新页面时背景色和字色的改变
         */
        function changeQianFanVistorColor(){
            var Id1=getLocVal("QianFanVistorID");
            $$(Id1).style.color="#5868b2";
            $$(Id1).style.backgroundColor="";
        }
        function changeOverSaleColor(){
            var Id2=getLocVal("OverSaleID");
            $$(Id2).style.color="#5868b2";
            $$(Id2).style.backgroundColor="";
        }
        function changeMeatColor(){
            var Id3=getLocVal("MeatID");
            $$(Id3).style.color="#5868b2";
            $$(Id3).style.backgroundColor="";
        }
        
        /**
         *航班任务中英文替换
         */
        function engorch(name){
            var chName = "";
            switch(name){
                case "arrive" : 
                    chName = "落地";
                    break;                                  
                case "on_block": 
                    chName =  "上轮档";
                    break;
                case "lavetory_service_arrival": 
                    chName =  "污水";
                    break;
                case "water_service": 
                    chName =  "清水";
                    break;
                case "on_block": 
                    chName =  "上轮档";
                    break;
                case "taxi": 
                    chName ="滑入";
                    break;
                case "fuelling":
                    chName ="加油";
                    break;
                case "cargo_door_open": 
                    chName ="开货舱门";
                    break; 
                case "carbin_door_open": 
                    chName ="开舱门";
                    break; 
                case "deboarding":
                    chName ="下客";
                    break; 
                case "unloading": 
                    chName ="货运卸";
                    break;
                case "load_sheet_in_cockpit": 
                    chName ="平衡单上传";
                    break;
                case "crew_on_board": 
                    chName ="机组到位";
                    break;
                case "catering": 
                    chName ="配餐";
                    break;
                case "first_bag": 
                    chName ="首件行李";
                    break;
                case "checkin_counter_closed":
                    chName ="值机关闭";
                    break;
                case "cargo_on_site": 
                    chName ="货物到位";
                    break;
                case "notice_to_boarding": 
                    chName ="通知登机";
                    break;
                case "end_bag_sorting": 
                    chName ="分拣交接";
                    break;
                case "last_bag": 
                    chName ="末件行李";
                    break;
                case "load": 
                    chName ="装机";
                    break;
                case "carbin_door_closed": 
                    chName ="关客舱门";
                    break;
                case "boarding":
                    chName ="登机";
                    break;
                case "cargo_door_closed":
                    chName ="关货舱门";
                    break;
                case "offblocks": 
                    chName ="撤轮档";
                    break;
                case "push_back": 
                    chName ="推出";
                    break;
                case "taxi_out": 
                    chName ="滑出";
                    break;
                case "depart": 
                    chName ="起飞";
                    break;
                case "carbin_clean": 
                    chName ="客舱清洁";
                    break;
                case "flight_inspection":   
                    chName ="航班督查";
                    break;
                case "carbincrew_on_board":   
                    chName ="乘务登机(客舱)";
                    break;
                case "trailer":   
                    chName ="拖车到位";
                    break;
                case "release_order":   
                    chName ="放行单上机";
                    break;
                case "release_order_finished":   
                    chName ="放行单完成";
                    break;
                case "load_sheet_finished":   
                    chName ="装机单完成";
                    break;
                case "maintenance_release":   
                    chName ="机务放行";
                    break;
                case "manifest_finished":   
                    chName ="舱单完成";
                    break;
                case "bridge_ladder":   
                    chName ="靠桥梯";
                    break;
                case "car_ferry":   
                    chName ="进港摆渡车";
                    break;
                case "air_bridge":   
                    chName ="撤桥梯";
                    break;
                default: 
                       chName=name;
                       break;                        
            }
            return chName;
        }
         
        /**
         *点击航班任务跳转至航班任务页面
         */
        function openHBRW(id,openImgId,openDetailId,biaozhi){ 
           localStorage.setItem("biaozhiwu",biaozhi);
           $$("airportFlight").value="";
           var hbrw = hbrwObj[id];
           setLocVal("hbrw",JSON.stringify(hbrw)); 
           var hbh= $$(id).getAttribute("data-hbn");
           setLocVal("hbh",hbh);
           var jh= $$(id).getAttribute("data-jh");
           setLocVal("jh",jh);
           var jx= $$(id).getAttribute("data-jx");
           setLocVal("jx",jx);
           var jw= $$(id).getAttribute("data-jw");       
           setLocVal("jw",jw);  
           var key= $$(id).getAttribute("data-key");
           setLocVal("Key",key);
           setLocVal("imgId",openImgId);//切换图片id
           setLocVal("detailId",openDetailId);//展开div的id
           var names=$$("airportText").innerHTML; 
           var airport = $$("airportText").getAttribute("data-airport");
            // if(airport=="PVG-W"){
                // alert('敬请期待');
                // return false;
            // }
           openNewWin("ensureNode","ensureNode.html");
        }
        /*
         *点击遣返旅客跳转至遣返旅客页面
         */
       function openQianFanVistor(id){
           //点击时改变字体和背景色
           $$(id).style.color="#ffffff";
           $$(id).style.backgroundColor="#5868b2";
           var cyr= $$(id).getAttribute("data-cyr");
           var hb= $$(id).getAttribute("data-hb");
           var takeoffAirport= $$(id).getAttribute("data-qf");
           var landingAirport= $$(id).getAttribute("data-jl");
           setLocVal("cyr",cyr);
           setLocVal("hb",hb);
           var takeoffThree = airportObj[takeoffAirport];
           var landingThree = airportObj[landingAirport];
           setLocVal("takeoffAirport",takeoffAirport);
           setLocVal("takeoffThree",takeoffThree);
           setLocVal("landingAirport",landingAirport);
           setLocVal("landingThree",landingThree);
           openNewWin("repatriatePassengerSearch","repatriatePassengerSearch.html");
           setLocVal("QianFanVistorID",id);
       }
       /**
         *点击机号跳转至当日航班页面
         */
       function openTodayDuty(id,i){
           var jh= $$(id).getAttribute("data-jh");
           var date= $$(id).getAttribute("data-key");
           var param1={
            "page": "plane-win",
             };
             var param2={
                 "tailNo":jh, 
                 "flightDate": date
                 //"popover":"PLANETODAYFLIGHTINFO"
             };

           var localCount1 = 'localStorage["MU3-xiaoI-param"]=\'' + JSON.stringify(param1) + '\'';
           var localCount2 = 'localStorage["plane"]=\'' + JSON.stringify(param2) + '\'';
           uexWindow.evaluateScript('today', '0', localCount1); 
           uexWindow.evaluateScript('today', '0', localCount2); 
           uexWindow.evaluateScript('today', '0', 'openTab("航班动态");');
           $$("airportFlight").value="";
       } 
       /**
         *点击航班号进入航班详情页面
         */
        function openAllFlightInfo(id){  
            var hbhId= $$(id).getAttribute("data-id");
            var date= $$(id).getAttribute("data-key");
            var param={
                "page": "flyInfo_win",
                condition:{
                    "flightInfoId":hbhId, 
                    "flightDate":date,
                    "popover":"flyInfo_basic"
                }
            };
           var localCount = 'localStorage["MU3-xiaoI-param"]=\'' + JSON.stringify(param) + '\''; 
           uexWindow.evaluateScript('today', '0', localCount); 
           uexWindow.evaluateScript('today', '0', 'openTab("航班动态");');
        }

       /**
        * 点击前序航班跳转到航班动态页面
        * @param  {[type]} id [description]
        * @return {[type]}    [description]
        */
       function openFlightInfor(id){
           var qxid= $$(id).getAttribute("data-qxid");
           var date= $$(id).getAttribute("data-key");
           if(qxid==""){
           alert("无前序航班！");
            }else{
             var param={
               "page" : "flyInfo_win",
               "condition":{
                   "flightInfoId":qxid, 
                   "flightDate":date,
                   "popover":"flyInfo_basic"
                }
             };
          var localCount = 'localStorage["MU3-xiaoI-param"]=\'' + JSON.stringify(param) + '\''; 
          uexWindow.evaluateScript('today', '0', localCount); 
          uexWindow.evaluateScript('today', '0', 'openTab("航班动态");');
           }          
       }
       /**
        * 点击机组信息跳转到航班动态页面
        * @param  {[type]} id [description]
        * @return {[type]}    [description]
        */
       function openWorkDetail(id){
           var id= $$(id).getAttribute("data-id");
           var param={
            "page" : "flyInfo_win",
            "condition":{
                "flightInfoId":id, 
                "popover":"flyInfo_crew"
                }
             };
           var localCount = 'localStorage["MU3-xiaoI-param"]=\'' + JSON.stringify(param) + '\''; 
           uexWindow.evaluateScript('today', '0', localCount); 
           uexWindow.evaluateScript('today', '0', 'openTab("航班动态");');
       }
        function pullDown(callback) {
            var j = { 
                "pullToReloadText" : "拖动加载",
                "releaseToReloadText" : "释放加载更多",
                "loadingText" : "加载中...",
                "loadingImagePath" : "res://shuaxin.png"
            }
            var i = {
                "pullToReloadText" : "下拉刷新",
                "releaseToReloadText" : "释放立即刷新",
                "loadingText" : "正在刷新...",
                "loadingImagePath" : "res://shuaxin.png"
            }
            uexWindow.setBounce("1");
            uexWindow.setBounceParams('0', JSON.stringify(i));
            uexWindow.setBounceParams('1', JSON.stringify(j));
            uexWindow.showBounceView("0", "#FFF", 1);
            uexWindow.showBounceView("1", "#FFF", 1);
            uexWindow.notifyBounceEvent("0", "1");
            uexWindow.notifyBounceEvent("1", "1");
            uexWindow.onBounceStateChange = function(type, status) {
                if (type == 0 && status == 2) {   
                    refreshType=0;
                    Flag=1;
                    pageNo = Math.min.apply(Math, pageNum);
                    pageNo--;
                    if((pageNo)<1){
                        alert("没有更多数据！");
                        uexWindow.resetBounceView('0');
                        uexWindow.resetBounceView('1');
                    }else{
                        callback();
                        return;
                        //uexWindow.resetBounceView('0');
                        //uexWindow.resetBounceView('1');
                    }
                    uexWindow.resetBounceView('1');
                }
                if (type == 1 && status == 2) {
                    refreshType=1; 
                    Flag=1;
                    pageNo = Math.max.apply(Math, pageNum);
                    pageNo++;
                    if((pageNo)<=maxPageNo){ 
                        callback();
                        return;
                    }else{
                        alert("没有更多数据！")
                        uexWindow.resetBounceView('0');
                        uexWindow.resetBounceView('1');
                    }
                }
            }
        }

        //向上拉加载数据
        function loadMoreData(){ 
            pageNo++;
            queryCurrentAirport();//进出港刷新
            airportSearch(); //重新加载数据
        }
        //下拉刷新最新数据
        function fullRefresh(){
            pageNo;
            fullRefreshFlag == 1;
            queryCurrentAirport();//进出港刷新
            airportSearch(); //重新加载数据
        }
        //选择航站后重新加载今天页面
        function setAirPort(){
            var name=getLocVal("airportName");
            var code=getLocVal("airportCode");
            Flag=0;
            pageNum=[];
            $$("flighDataInfo").innerHTML = "";
            $$("airportText").setAttribute("data-airport",code);
            $$("airportText").innerHTML = name;
            airportSearch(name);  //查询航站飞机信息
            queryCurrentAirport(code); //查询进出港数据
        }
        //不正常航班上报处置方案禁止重复提交
        function notRepeatedSubmit(){
            var times=getLocVal("Time");
            var dwID=getLocVal("dwId"); 
            var thyy = getLocVal("thyy");
            if(times == 1 && thyy == ""){
                $$("dwID").onclick=null;//如果提交过 则存在标识times 若存在标志且退回原因为空时 移除点击事件
            }
        }
        var lr_scroll = function(option) {
            var defaults = {
                container : '',
                next : function() {
                }
            }
            var start,
                end,
                length;
            var obj = document.querySelector(option.container);
            var loading = obj.firstElementChild;
            var offset = loading.clientWidth;
            var objparent = obj.parentElement;
            /*操作方法*/
            var fn = {
                addEvent : function(element, event_name, event_fn) {
                    if (element.addEventListener) {
                        element.addEventListener(event_name, event_fn, false);
                    } else if (element.attachEvent) {
                        element.attachEvent('on' + event_name, event_fn);
                    } else {
                        element['on' + event_name] = event_fn;
                    }
                }
            };
        
            fn.addEvent(obj, 'touchstart', start);
            fn.addEvent(obj, 'touchmove', move);
            fn.addEvent(obj, 'touchend', end);
            fn.addEvent(obj, 'mousedown', start)
            fn.addEvent(obj, 'mousemove', move)
            fn.addEvent(obj, 'mouseup', end)
        
            //滑动开始
            function start(e) {
                    var even = typeof event == "undefined" ? e : event;
                    //标识操作进行中
                    isLock = true;
                    isCanDo = true;
                    //保存当前鼠标Y坐标
                    start = hasTouch ? even.touches[0].pageX : even.pageX;
            }
        
            //滑动中
            function move(e) {
                    var even = typeof event == "undefined" ? e : event;
                    //保存当前鼠标Y坐标
                    end = hasTouch ? even.touches[0].pageX : even.pageX;
                    if (start < end) {
                        if ((end - start - offset) / 2 <= 150) {
                            length = (end - start - offset) / 2;
                            fn.translate(length);
                        } else {
                            length += 0.3;
                            fn.translate(length);
                        }
                    }
            }
              //滑动结束
            function end(e) {
                        if ( typeof option.next == "function") {
                            option.next.call(fn, e);
                        }
            }
        }
    </script>
</html>